from datetime import datetime
import hashlib

def is_expired(publish_date):
	"""
	比当年小2年默认为过期信息
	"""
	year = int(publish_date[:4])
	this_year = datetime.today().year
	if this_year - year > 2:
		return True
	else:
		return False


def md5sum(content):
	md5_content = hashlib.md5(content.encode("utf-8"))
	return md5_content.hexdigest()